1. Field of the Invention
The present invention relates to a data processing apparatus for motion compensation of moving picture image data and a method and encoding device of the same.
2. Description of the Related Art
In recent years, apparatuses based on the MPEG (Moving Picture Experts Group) and other schemes handling image data digitally and at that time compressing the data by an orthogonal transform such as a discrete cosine transform and motion compensation utilizing the redundancy inherent to image information for the purpose of high efficiency transmission and storage of information have been spreading in use both for broadcasting of information by broadcast stations etc. and for the reception of information at general homes.
As a followup to the MPEG scheme, the encoding scheme referred to as the “JVT” (Joint Video Team) for realizing a further higher compression rate has been proposed.
In the JVT scheme, in the same way as the MPEG, in motion prediction and compensation processing, the motion prediction and compensation are carried out based on a motion vector.
In an encoding device of the JVT scheme, for example the motion prediction and compensation processing uses macro blocks MB as units, specifies the macro block MB minimizing the index data COST indicating a sum of differences among corresponding pixel data between frame data covered by the motion compensation and reference image data thereof in the reference image data, and generates a motion vector in accordance with its position.
Such an encoding device cumulatively adds, for each of the frame data covered by the motion compensation and the reference image data thereof, pixel data having the same pixel position in the row direction (vertical direction) in macro blocks in units of macro blocks so as to generate horizontal projection image data and cumulatively adds pixel data having the same pixel position in the column direction (horizontal direction) so as to generate vertical projection image data.
The encoding device generates projection index data PJ_COST indicating the difference based on the horizontal projection image data and vertical projection image data between the macro blocks of the frame data covered by the motion compensation and the macro blocks of the reference image data.
The encoding device specifies the macro block MB minimizing the projection index data PJ_COST among the plurality of macro blocks in the reference image data and generates a motion vector based on its position.
A conventional encoding device sequentially writes for example the vertical projection image data of the macro blocks MB at continuous addresses (addresses in the horizontal direction) in a memory and sequentially writes the horizontal projection image data at noncontinuous addresses (addresses in the vertical direction) in the memory.
Summarizing the problem to be solved by the invention, in such a conventional encoding device, since the horizontal projection image data of the macro blocks are sequentially written at a sequence of noncontinuous addresses in the memory, there are the problems that a long time is taken for reading the data, pipeline processing cannot be efficiently carried out, and the processing time becomes long.
Further, in the conventional encoding device, the motion vector is searched for based on the macro blocks MB in a search range defined around a predetermined search base point in the reference image data. In this search operation, for example, intervals of search positions are made the same in the entire search range. Shortening of the processing time of the search operation is therefore demanded.
Further, in the conventional encoding device, in the search for a motion vector using a projection image, there is the problem that for example a correct motion vector MV cannot be generated for macro blocks MB having different image patterns but the same index data PJ_COST by the projection image.